package com.example.exception;

import lombok.Data;

/**
 * 自定义异常类
 */
@Data
public class ServiceException extends RuntimeException {

    //错误响应码
    /**
     * 401:权限错误
     * 500:服务端错误
     */
    private Integer code;

    public ServiceException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
